require(['./config'], () => {
    require(['template', 'swiper', 'header', 'footer', 'jquery'], (template, swiper) => {
        class Index {
            constructor() {
                this.swiper1()
                this.swiper2()
                this.hit()
            }
            swiper1() {
                var mySwiper = new Swiper('.swiper-container', {
                    direction: 'horizontal',
                    speed: 3000,
                    loop: true,
                    autoplay: 1000,
                    // 如果需要前进后退按钮
                    nextButton: '.swiper-button-next',
                    prevButton: '.swiper-button-prev'
                })
            }
            swiper2() {
                var mySwiper = new Swiper('.swiper2-container', {
                    direction: 'vertical',
                    speed: 1000,
                    loop: true,
                    height: 510,
                    autoplay: 1000
                })
            }
            hit() {
                $('.hou').on('mouseover', function() {
                    $(this).children(".txt").children(".up").addClass('active').parent().parent().siblings().children(".txt").children(".up").removeClass('active')
                    $('.pic').eq($(this).index()).css('opacity', '1').siblings().css('opacity', '0')
                })
            }
        }
        new Index()

    })
})